package com.spring.cloud.weather.report.service;

import com.spring.cloud.weather.report.constant.ZuulConstant;
import com.spring.cloud.weather.report.vo.WeatherResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Administrator on 2018/3/19
 */
@FeignClient(name = ZuulConstant.ZUUL_NAME, fallback = DataClientFallBack.class)
public interface DataClient {

    @GetMapping("/data/weather/cityId/{cityId}")
    WeatherResponse getWeatherByCityId(@PathVariable("cityId") String cityId);

}
